package com.atguigu.pratice;

import java.util.Scanner;

public class ThePrimeAddToEven {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        for(int i=n/2;i>0;i--){
            if(isPrime(i)&&isPrime(n-i)){
                System.out.println(i);
                System.out.println(n-i);
                return;
            }
        }
    }
    public static boolean isPrime(int n){
        for(int i=2;i<=n-1;i++){
            if(n%i==0){
                return false;
            }
        }
        return true;
    }
}
